USPS Intelligent Mail Barcodes
FormFusion 3.3 supports the Intelligent Mail barcode specification used by the United States Postal Service. It is also known as the USPS OneCode Solution or USPS 4-State Customer barcode (4CB, 4-CB, or USPS4CB).
USPS provides mailing discounts to customers who use barcodes to identify large volumes of outgoing mail. FormFusion can take a numeric string as input and generate the corresponding Intelligent Mail barcode, which can then be placed on the FormStamp to print on envelopes or on the mailer portion of a form.
The barcode contains a 20 to 31-digit number containing information identifying the sender, the mail class, and the destination ZIP code:
|
Field |
Digits |
More Information |
---|---|---|---|
Tracking code |
Barcode Identifier | 2 | Presort identification number – describes whether or not the mail has already been sorted to some extent Chart of USPS Barcode Identifiers |
Service Type Identifier | 3 | Type of mail service (e.g. first class, standard, priority, etc.) Chart of USPS Service Type Identifiers |
|
Mailer Identifier | 6 or 9 | Unique number identifying the USPS customer (the sender) Assigned by USPS |
|
Serial number | 9 or 6 | Sender’s serial or sequence number to track each piece of mail If the Mailer Identifier is 6 digits, the serial number can use 9. If the Mailer Identifier is 9 digits, the serial number can use 6. |
|
Routing Code |
Delivery point ZIP code | 0, 5, 9, or 11 | Recipient's ZIP code |
Total | 20-31 depending on routing code |
This table is a general overview of the barcode format. For exact specifications and any updates or changes, please refer to the USPS publications available at https://ribbs.usps.gov/index.cfm
There are three setup steps required to produce Intelligent Mail barcodes in FormFusion:
- Install the barcode font
- Map or create the numeric string to be encoded, based on data in the input file
- Add the variable containing the string to the FormStamp, and encode it as an Intelligent Mail barcode
Installing the Barcode Font
The Intelligent Mail barcode font can be downloaded from the USPS website linked above, or from the Documentation and Software page of the Evisions website.
As with any other font, it must be added to both the template developer’s machine and the MAP server. The list of fonts visible in the dropdowns in FormFusion is populated from the client machine, but the fonts used at run time are those on the server (since the MAP server does the actual job processing).
In order to print hard copy output, the MAP server must be rebooted before any newly installed fonts can be used. PDF output should render correctly without a reboot. Note that it is the actual machine that must be restarted, not just the MAPS service.
Storing the Numeric String into a FormFusion Variable
Depending on the input file, it may be possible to read in some or all of the string from the input file using MapForm variables. Alternatively, use a CaptureForm query to build the input string, incorporating information from MapForm as needed.
The following example builds a CaptureForm query that hard codes most of the USPS options, and uses the recipient’s ZIP code from the input file.
- In MapForm, use a floating or offset field to map the ZIP code from the input file.
- Create a new string SQL variable in Variable Storage.
- Create a CaptureForm query that builds the numeric string. Use the :ZIP variable at the end of the string for the Routing Code.
Notice how the rest of the string has been entered as static text. If another part of the string (for example, the serial number) will use variable input, edit the query to use the additional variables.
Adding the Barcode to FormStamp
- Add the :Barcode variable to the FormStamp using a data field. Place it where the barcode should appear on the form.
- Double click the data field to edit its properties. On the Barcode tab, select “USPS Intelligent Mail” in the encoding drop down.
- On the Font tab, choose the “USPSIMBStandard” font.
Click OK to exit out of the dialog. Then, save the template. - If preview mode is turned on, the barcode displays as string data on the FormStamp. To see how the barcode actually looks, do a test print template.
Troubleshooting
Nothing is printing where the barcode should appear
If the barcode encoder receives invalid input, it will not print. This feature helps to prevent mail from being sent out with invalid barcodes.
- Check to make sure that the barcode variable contains exactly the right number of characters. Valid numeric string lengths are 20, 25, 29, and 31 characters, depending on the length of the ZIP code.
- Verify that each of the USPS-defined fields is correct. For example, the Barcode Identifier must be one of the six values shown in the USPS chart linked above.
- To view the numeric string being stored in the barcode variable, temporarily turn off the barcode encoding in the object properties and print it as plain text.
The barcode is printing as a string of letters instead of as a barcode
This indicates that the numeric string has been encoded, but the system is unable to use the barcode font that turns the character string into an actual barcode. Check to make sure that:
- The font has been installed on the local machine and on the MAP server
- The “USPSIMBStandard” font is selected in the object properties for the variable
- The MAP server has been rebooted since the font was installed
The barcode is the wrong size/in the wrong location
Refer to the USPS publications available at https://ribbs.usps.gov/index.cfm for information on the size, location, and surrounding padding required for Intelligent Mail barcodes.
- To adjust the size, choose a different font size in the object properties for the barcode.
- To change the location, click and drag the barcode object. If printing the barcode above the address block, align the left side of the barcode object with the left side of the address. Turning on alignment tools can make it easier to line up multiple objects.
Recipients of PDF files are unable to view the barcodes
By default, PDF files do not include custom fonts in the file. If such a PDF file uses a font that the viewer does not have installed, it chooses a substitute font. To make sure that barcodes display correctly in PDF output, turn on font embedding in the PDF options of the FormDirector.